# 模块名称
set(MODULE web-deamon)

message("GOAHEAD_INCLUDE: ${GOAHEAD_INCLUDE_DIR}, GOAHEAD_LINK: ${GOAHEAD_LIBS_DIR}")

include_directories(${PRODUCT_ROOT_DIR}/thirdparty/hat-trie/include)

# find_library(LIBEVENT_CORE_LIBRARY event_core ${LIBEVENT_LIBS_DIR} NO_DEFAULT_PATH)

add_executable(${MODULE} web_vendor.cpp web_handler.cpp web_deamon.cpp ajax_handler.cpp)
target_link_directories(${MODULE} PUBLIC ${GOAHEAD_LIBS_DIR} ${JSONCPP_LIBS_DIR})
target_include_directories(${MODULE} PUBLIC ./  ../
        ${GOAHEAD_INCLUDE_DIR}
        ${JSONCPP_INCLUDE_DIR})
add_dependencies(${MODULE} vendor)
target_link_libraries(${MODULE} $<TARGET_OBJECTS:vendor> settings
        go jsoncpp)
install(TARGETS ${MODULE}
        DESTINATION webconfig/
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ)